3.193 \(\int \frac{(a+b \sec (e+f x))^2}{(c+d \sec (e+f x))^3} \, dx\)

Optimal. Leaf size=237 \[ -\frac{\left (a^2 \left (-5 c^2 d^3+6 c^4 d+2 d^5\right )-2 a b c^3 \left (2 c^2+d^2\right )+3 b^2 c^4 d\right ) \tanh ^{-1}\left (\frac{\sqrt{c-d} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c+d}}\right )}{c^3 f (c-d)^{5/2} (c+d)^{5/2}}+\frac{a^2 x}{c^3}-\frac{(b c-a d) \left (3 a d \left (2 c^2-d^2\right )-b c \left (2 c^2+d^2\right )\right ) \sin (e+f x)}{2 c^2 f \left (c^2-d^2\right )^2 (c \cos (e+f x)+d)}-\frac{d (b c-a d)^2 \sin (e+f x)}{2 c^2 f \left (c^2-d^2\right ) (c \cos (e+f x)+d)^2} \]

[Out]

(a^2*x)/c^3 - ((3*b^2*c^4*d - 2*a*b*c^3*(2*c^2 + d^2) + a^2*(6*c^4*d - 5*c^2*d^3 + 2*d^5))*ArcTanh[(Sqrt[c - d
]*Tan[(e + f*x)/2])/Sqrt[c + d]])/(c^3*(c - d)^(5/2)*(c + d)^(5/2)*f) - (d*(b*c - a*d)^2*Sin[e + f*x])/(2*c^2*
(c^2 - d^2)*f*(d + c*Cos[e + f*x])^2) - ((b*c - a*d)*(3*a*d*(2*c^2 - d^2) - b*c*(2*c^2 + d^2))*Sin[e + f*x])/(
2*c^2*(c^2 - d^2)^2*f*(d + c*Cos[e + f*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.795608, antiderivative size = 237, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.24, Rules used = {3941, 2988, 3021, 2735, 2659, 208} \[ -\frac{\left (a^2 \left (-5 c^2 d^3+6 c^4 d+2 d^5\right )-2 a b c^3 \left (2 c^2+d^2\right )+3 b^2 c^4 d\right ) \tanh ^{-1}\left (\frac{\sqrt{c-d} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c+d}}\right )}{c^3 f (c-d)^{5/2} (c+d)^{5/2}}+\frac{a^2 x}{c^3}-\frac{(b c-a d) \left (3 a d \left (2 c^2-d^2\right )-b c \left (2 c^2+d^2\right )\right ) \sin (e+f x)}{2 c^2 f \left (c^2-d^2\right )^2 (c \cos (e+f x)+d)}-\frac{d (b c-a d)^2 \sin (e+f x)}{2 c^2 f \left (c^2-d^2\right ) (c \cos (e+f x)+d)^2} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sec[e + f*x])^2/(c + d*Sec[e + f*x])^3,x]

[Out]

(a^2*x)/c^3 - ((3*b^2*c^4*d - 2*a*b*c^3*(2*c^2 + d^2) + a^2*(6*c^4*d - 5*c^2*d^3 + 2*d^5))*ArcTanh[(Sqrt[c - d
]*Tan[(e + f*x)/2])/Sqrt[c + d]])/(c^3*(c - d)^(5/2)*(c + d)^(5/2)*f) - (d*(b*c - a*d)^2*Sin[e + f*x])/(2*c^2*
(c^2 - d^2)*f*(d + c*Cos[e + f*x])^2) - ((b*c - a*d)*(3*a*d*(2*c^2 - d^2) - b*c*(2*c^2 + d^2))*Sin[e + f*x])/(
2*c^2*(c^2 - d^2)^2*f*(d + c*Cos[e + f*x]))

Rule 3941

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_), x_Symbol] :> Int[
((b + a*Sin[e + f*x])^m*(d + c*Sin[e + f*x])^n)/Sin[e + f*x]^(m + n), x] /; FreeQ[{a, b, c, d, e, f, m, n}, x]
 && NeQ[b*c - a*d, 0] && IntegerQ[m] && IntegerQ[n] && LeQ[-2, m + n, 0]

Rule 2988

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^2*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.)
 + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[((B*c - A*d)*(b*c - a*d)^2*Cos[e + f*x]*(c + d*Sin[e + f*x])^(n + 1))/
(f*d^2*(n + 1)*(c^2 - d^2)), x] - Dist[1/(d^2*(n + 1)*(c^2 - d^2)), Int[(c + d*Sin[e + f*x])^(n + 1)*Simp[d*(n
 + 1)*(B*(b*c - a*d)^2 - A*d*(a^2*c + b^2*c - 2*a*b*d)) - ((B*c - A*d)*(a^2*d^2*(n + 2) + b^2*(c^2 + d^2*(n +
1))) + 2*a*b*d*(A*c*d*(n + 2) - B*(c^2 + d^2*(n + 1))))*Sin[e + f*x] - b^2*B*d*(n + 1)*(c^2 - d^2)*Sin[e + f*x
]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d
^2, 0] && LtQ[n, -1]

Rule 3021

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f
_.)*(x_)]^2), x_Symbol] :> -Simp[((A*b^2 - a*b*B + a^2*C)*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1))/(b*f*(m +
 1)*(a^2 - b^2)), x] + Dist[1/(b*(m + 1)*(a^2 - b^2)), Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[b*(a*A - b*B + a*
C)*(m + 1) - (A*b^2 - a*b*B + a^2*C + b*(A*b - a*B + b*C)*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e,
 f, A, B, C}, x] && LtQ[m, -1] && NeQ[a^2 - b^2, 0]

Rule 2735

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*x)/d
, x] - Dist[(b*c - a*d)/d, Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d
, 0]

Rule 2659

Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[(2*e)/d, Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin{align*} \int \frac{(a+b \sec (e+f x))^2}{(c+d \sec (e+f x))^3} \, dx &=\int \frac{\cos (e+f x) (b+a \cos (e+f x))^2}{(d+c \cos (e+f x))^3} \, dx\\ &=-\frac{d (b c-a d)^2 \sin (e+f x)}{2 c^2 \left (c^2-d^2\right ) f (d+c \cos (e+f x))^2}-\frac{\int \frac{-2 c (b c-a d)^2+\left (b^2 c^2 d-2 a b c \left (2 c^2-d^2\right )+a^2 \left (2 c^2 d-d^3\right )\right ) \cos (e+f x)-2 a^2 c \left (c^2-d^2\right ) \cos ^2(e+f x)}{(d+c \cos (e+f x))^2} \, dx}{2 c^2 \left (c^2-d^2\right )}\\ &=-\frac{d (b c-a d)^2 \sin (e+f x)}{2 c^2 \left (c^2-d^2\right ) f (d+c \cos (e+f x))^2}-\frac{(b c-a d) \left (3 a d \left (2 c^2-d^2\right )-b c \left (2 c^2+d^2\right )\right ) \sin (e+f x)}{2 c^2 \left (c^2-d^2\right )^2 f (d+c \cos (e+f x))}-\frac{\int \frac{-c^2 (b c-a d) \left (4 a c^2-3 b c d-a d^2\right )-2 a^2 c \left (c^2-d^2\right )^2 \cos (e+f x)}{d+c \cos (e+f x)} \, dx}{2 c^3 \left (c^2-d^2\right )^2}\\ &=\frac{a^2 x}{c^3}-\frac{d (b c-a d)^2 \sin (e+f x)}{2 c^2 \left (c^2-d^2\right ) f (d+c \cos (e+f x))^2}-\frac{(b c-a d) \left (3 a d \left (2 c^2-d^2\right )-b c \left (2 c^2+d^2\right )\right ) \sin (e+f x)}{2 c^2 \left (c^2-d^2\right )^2 f (d+c \cos (e+f x))}-\frac{\left (3 b^2 c^4 d-2 a b c^3 \left (2 c^2+d^2\right )+a^2 \left (6 c^4 d-5 c^2 d^3+2 d^5\right )\right ) \int \frac{1}{d+c \cos (e+f x)} \, dx}{2 c^3 \left (c^2-d^2\right )^2}\\ &=\frac{a^2 x}{c^3}-\frac{d (b c-a d)^2 \sin (e+f x)}{2 c^2 \left (c^2-d^2\right ) f (d+c \cos (e+f x))^2}-\frac{(b c-a d) \left (3 a d \left (2 c^2-d^2\right )-b c \left (2 c^2+d^2\right )\right ) \sin (e+f x)}{2 c^2 \left (c^2-d^2\right )^2 f (d+c \cos (e+f x))}-\frac{\left (3 b^2 c^4 d-2 a b c^3 \left (2 c^2+d^2\right )+a^2 \left (6 c^4 d-5 c^2 d^3+2 d^5\right )\right ) \operatorname{Subst}\left (\int \frac{1}{c+d+(-c+d) x^2} \, dx,x,\tan \left (\frac{1}{2} (e+f x)\right )\right )}{c^3 \left (c^2-d^2\right )^2 f}\\ &=\frac{a^2 x}{c^3}+\frac{\left (4 a b c^5-6 a^2 c^4 d-3 b^2 c^4 d+2 a b c^3 d^2+5 a^2 c^2 d^3-2 a^2 d^5\right ) \tanh ^{-1}\left (\frac{\sqrt{c-d} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c+d}}\right )}{c^3 (c-d)^{5/2} (c+d)^{5/2} f}-\frac{d (b c-a d)^2 \sin (e+f x)}{2 c^2 \left (c^2-d^2\right ) f (d+c \cos (e+f x))^2}-\frac{(b c-a d) \left (3 a d \left (2 c^2-d^2\right )-b c \left (2 c^2+d^2\right )\right ) \sin (e+f x)}{2 c^2 \left (c^2-d^2\right )^2 f (d+c \cos (e+f x))}\\ \end{align*}

Mathematica [B]  time = 2.01916, size = 493, normalized size = 2.08 \[ \frac{\sec (e+f x) (a+b \sec (e+f x))^2 (c \cos (e+f x)+d) \left (\frac{6 a^2 c^4 d^2 \sin (2 (e+f x))+10 a^2 c^3 d^3 \sin (e+f x)-3 a^2 c^2 d^4 \sin (2 (e+f x))+2 a^2 c^2 \left (c^2-d^2\right )^2 (e+f x) \cos (2 (e+f x))+8 a^2 c d \left (c^2-d^2\right )^2 (e+f x) \cos (e+f x)-6 a^2 c^2 d^4 e-6 a^2 c^2 d^4 f x+2 a^2 c^6 e+2 a^2 c^6 f x-4 a^2 c d^5 \sin (e+f x)+4 a^2 d^6 e+4 a^2 d^6 f x-12 a b c^4 d^2 \sin (e+f x)+2 a b c^3 d^3 \sin (2 (e+f x))-8 a b c^5 d \sin (2 (e+f x))+b^2 c^4 d^2 \sin (2 (e+f x))+4 b^2 c^3 d^3 \sin (e+f x)+2 b^2 c^5 d \sin (e+f x)+2 b^2 c^6 \sin (2 (e+f x))}{\left (c^2-d^2\right )^2}+\frac{4 \left (a^2 \left (-5 c^2 d^3+6 c^4 d+2 d^5\right )-2 a b c^3 \left (2 c^2+d^2\right )+3 b^2 c^4 d\right ) (c \cos (e+f x)+d)^2 \tanh ^{-1}\left (\frac{(d-c) \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c^2-d^2}}\right )}{\left (c^2-d^2\right )^{5/2}}\right )}{4 c^3 f (a \cos (e+f x)+b)^2 (c+d \sec (e+f x))^3} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sec[e + f*x])^2/(c + d*Sec[e + f*x])^3,x]

[Out]

((d + c*Cos[e + f*x])*Sec[e + f*x]*(a + b*Sec[e + f*x])^2*((4*(3*b^2*c^4*d - 2*a*b*c^3*(2*c^2 + d^2) + a^2*(6*
c^4*d - 5*c^2*d^3 + 2*d^5))*ArcTanh[((-c + d)*Tan[(e + f*x)/2])/Sqrt[c^2 - d^2]]*(d + c*Cos[e + f*x])^2)/(c^2
- d^2)^(5/2) + (2*a^2*c^6*e - 6*a^2*c^2*d^4*e + 4*a^2*d^6*e + 2*a^2*c^6*f*x - 6*a^2*c^2*d^4*f*x + 4*a^2*d^6*f*
x + 8*a^2*c*d*(c^2 - d^2)^2*(e + f*x)*Cos[e + f*x] + 2*a^2*c^2*(c^2 - d^2)^2*(e + f*x)*Cos[2*(e + f*x)] + 2*b^
2*c^5*d*Sin[e + f*x] - 12*a*b*c^4*d^2*Sin[e + f*x] + 10*a^2*c^3*d^3*Sin[e + f*x] + 4*b^2*c^3*d^3*Sin[e + f*x]
- 4*a^2*c*d^5*Sin[e + f*x] + 2*b^2*c^6*Sin[2*(e + f*x)] - 8*a*b*c^5*d*Sin[2*(e + f*x)] + 6*a^2*c^4*d^2*Sin[2*(
e + f*x)] + b^2*c^4*d^2*Sin[2*(e + f*x)] + 2*a*b*c^3*d^3*Sin[2*(e + f*x)] - 3*a^2*c^2*d^4*Sin[2*(e + f*x)])/(c
^2 - d^2)^2))/(4*c^3*f*(b + a*Cos[e + f*x])^2*(c + d*Sec[e + f*x])^3)

________________________________________________________________________________________

Maple [B]  time = 0.098, size = 1593, normalized size = 6.7 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sec(f*x+e))^2/(c+d*sec(f*x+e))^3,x)

[Out]

2/f*a^2/c^3*arctan(tan(1/2*f*x+1/2*e))-6/f/(tan(1/2*f*x+1/2*e)^2*c-tan(1/2*f*x+1/2*e)^2*d-c-d)^2/(c-d)/(c^2+2*
c*d+d^2)*tan(1/2*f*x+1/2*e)^3*a^2*d^2-1/f/c/(tan(1/2*f*x+1/2*e)^2*c-tan(1/2*f*x+1/2*e)^2*d-c-d)^2/(c-d)/(c^2+2
*c*d+d^2)*tan(1/2*f*x+1/2*e)^3*a^2*d^3+2/f/c^2/(tan(1/2*f*x+1/2*e)^2*c-tan(1/2*f*x+1/2*e)^2*d-c-d)^2/(c-d)/(c^
2+2*c*d+d^2)*tan(1/2*f*x+1/2*e)^3*a^2*d^4+8/f*c/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^2/(tan
(1/2*f*x+1/2*e)^2*c-tan(1/2*f*x+1/2*e)^2*d-c-d)^2/(c+d)/(c-d)^2*tan(1/2*f*x+1/2*e)*b^2-1/f*c/(tan(1/2*f*x+1/2*
e)^2*c-tan(1/2*f*x+1/2*e)^2*d-c-d)^2/(c+d)/(c-d)^2*tan(1/2*f*x+1/2*e)*b^2*d+2/f/(tan(1/2*f*x+1/2*e)^2*c-tan(1/
2*f*x+1/2*e)^2*d-c-d)^2/(c+d)/(c-d)^2*tan(1/2*f*x+1/2*e)*b^2*d^2-6/f*c/(c^4-2*c^2*d^2+d^4)/((c+d)*(c-d))^(1/2)
*arctanh(tan(1/2*f*x+1/2*e)*(c-d)/((c+d)*(c-d))^(1/2))*a^2*d+5/f/c/(c^4-2*c^2*d^2+d^4)/((c+d)*(c-d))^(1/2)*arc
tanh(tan(1/2*f*x+1/2*e)*(c-d)/((c+d)*(c-d))^(1/2))*a^2*d^3-2/f/c^3/(c^4-2*c^2*d^2+d^4)/((c+d)*(c-d))^(1/2)*arc
tanh(tan(1/2*f*x+1/2*e)*(c-d)/((c+d)*(c-d))^(1/2))*a^2*d^5+4/f*c^2/(c^4-2*c^2*d^2+d^4)/((c+d)*(c-d))^(1/2)*arc
tanh(tan(1/2*f*x+1/2*e)*(c-d)/((c+d)*(c-d))^(1/2))*a*b+2/f/(c^4-2*c^2*d^2+d^4)/((c+d)*(c-d))^(1/2)*arctanh(tan
(1/2*f*x+1/2*e)*(c-d)/((c+d)*(c-d))^(1/2))*a*b*d^2-3/f*c/(c^4-2*c^2*d^2+d^4)/((c+d)*(c-d))^(1/2)*arctanh(tan(1
/2*f*x+1/2*e)*(c-d)/((c+d)*(c-d))^(1/2))*b^2*d

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e))^2/(c+d*sec(f*x+e))^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 0.821454, size = 2946, normalized size = 12.43 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e))^2/(c+d*sec(f*x+e))^3,x, algorithm="fricas")

[Out]

[1/4*(4*(a^2*c^8 - 3*a^2*c^6*d^2 + 3*a^2*c^4*d^4 - a^2*c^2*d^6)*f*x*cos(f*x + e)^2 + 8*(a^2*c^7*d - 3*a^2*c^5*
d^3 + 3*a^2*c^3*d^5 - a^2*c*d^7)*f*x*cos(f*x + e) + 4*(a^2*c^6*d^2 - 3*a^2*c^4*d^4 + 3*a^2*c^2*d^6 - a^2*d^8)*
f*x - (4*a*b*c^5*d^2 + 2*a*b*c^3*d^4 + 5*a^2*c^2*d^5 - 2*a^2*d^7 - 3*(2*a^2 + b^2)*c^4*d^3 + (4*a*b*c^7 + 2*a*
b*c^5*d^2 + 5*a^2*c^4*d^3 - 2*a^2*c^2*d^5 - 3*(2*a^2 + b^2)*c^6*d)*cos(f*x + e)^2 + 2*(4*a*b*c^6*d + 2*a*b*c^4
*d^3 + 5*a^2*c^3*d^4 - 2*a^2*c*d^6 - 3*(2*a^2 + b^2)*c^5*d^2)*cos(f*x + e))*sqrt(c^2 - d^2)*log((2*c*d*cos(f*x
 + e) - (c^2 - 2*d^2)*cos(f*x + e)^2 - 2*sqrt(c^2 - d^2)*(d*cos(f*x + e) + c)*sin(f*x + e) + 2*c^2 - d^2)/(c^2
*cos(f*x + e)^2 + 2*c*d*cos(f*x + e) + d^2)) + 2*(b^2*c^7*d - 6*a*b*c^6*d^2 + 6*a*b*c^4*d^4 + 2*a^2*c*d^7 + (5
*a^2 + b^2)*c^5*d^3 - (7*a^2 + 2*b^2)*c^3*d^5 + (2*b^2*c^8 - 8*a*b*c^7*d + 10*a*b*c^5*d^3 - 2*a*b*c^3*d^5 + 3*
a^2*c^2*d^6 + (6*a^2 - b^2)*c^6*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3*c^9*d^2 + 3*c^7*d^4 - c^5*d^6)*f*cos(f*x + e)^2 + 2*(c^10*d - 3*c^8*d^3
 + 3*c^6*d^5 - c^4*d^7)*f*cos(f*x + e) + (c^9*d^2 - 3*c^7*d^4 + 3*c^5*d^6 - c^3*d^8)*f)]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (a + b \sec{\left (e + f x \right )}\right )^{2}}{\left (c + d \sec{\left (e + f x \right )}\right )^{3}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e))**2/(c+d*sec(f*x+e))**3,x)

[Out]

Integral((a + b*sec(e + f*x))**2/(c + d*sec(e + f*x))**3, x)

________________________________________________________________________________________

Giac [B]  time = 1.57897, size = 926, normalized size = 3.91 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e))^2/(c+d*sec(f*x+e))^3,x, algorithm="giac")

[Out]

((4*a*b*c^5 - 6*a^2*c^4*d - 3*b^2*c^4*d + 2*a*b*c^3*d^2 + 5*a^2*c^2*d^3 - 2*a^2*d^5)*(pi*floor(1/2*(f*x + e)/p
i + 1/2)*sgn(-2*c + 2*d) + arctan(-(c*tan(1/2*f*x + 1/2*e) - d*tan(1/2*f*x + 1/2*e))/sqrt(-c^2 + d^2)))/((c^7
- 2*c^5*d^2 + c^3*d^4)*sqrt(-c^2 + d^2)) + (f*x + e)*a^2/c^3 - (2*b^2*c^5*tan(1/2*f*x + 1/2*e)^3 - 8*a*b*c^4*d
*tan(1/2*f*x + 1/2*e)^3 - b^2*c^4*d*tan(1/2*f*x + 1/2*e)^3 + 6*a^2*c^3*d^2*tan(1/2*f*x + 1/2*e)^3 + 6*a*b*c^3*
d^2*tan(1/2*f*x + 1/2*e)^3 + b^2*c^3*d^2*tan(1/2*f*x + 1/2*e)^3 - 5*a^2*c^2*d^3*tan(1/2*f*x + 1/2*e)^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